import {
  HTTP
} from '../../utils/http.js'

class OrderModel extends HTTP {
  constructor() {
    super()
  }

  getOrderListForVisitor() {
    return this.request('api/ATC.Order.getOrderList')
  }

  getOrderList(data) {
    return this.request('api/ATC.Order.getListData.vdt', data)
  }

  getOrderDetail(data) {
    return this.request('api/ATC.Order.Edit.vdp', data)
  }

  robOrder(data) {
    return this.request('api/ATC.Order.robOrder', data)
  }

  saveOrder(data) {
    return this.request('api/ATC.Order.save', data)
  }

  completeOrder(data) {
    return this.request('api/ATC.Order.completeOrder', data)
  }

  submitOrder(data) {
    return this.request('api/ATC.Order.confirm', data)
  }

  cancelOrder(data) {
    return this.request('api/ATC.Order.cancelOrder', data)
  }

  getCancelReasonDic() {
    return this.request('api/ATC.OrderOperation.List.vdp')
  }

  evaluateOrder(data) {
    return this.request('api/ATC.Order.evaluateOrder', data)
  }

  getPersonByOrder(data) {
    return this.request('api/ATC.Order.getPersonByOrder',data)
  }
}

export {
  OrderModel
}